cap drop i*_procuringcategory
gen i_procuringcategory = ustrregexra(procuringcategory, "^([0-9]+)\-.*","$1")
egen id_procuringcategory = group(i_procuringcategory)
tab i_procuringcategory

forvalues x = 1(1)`r(r)'{
	local buyer = "Georgia"
	*	args runningvar outcomevar condition folder title graph days
	cap drop thecategory
	qui gen thecategory = (id_procuringcategory == `x')
	qui count if thecategory == 1
	if r(N) > 500{
		gsort -thecategory
		local title = procuringcategory[1]
		local i = i_procuringcategory[1]
		*di "`i'"
		cap drop c`i'
		gen c`i' = 1 if thecategory == 1
		*cap drawgraph_1x2_days delta_win1 lnblog "c`i' == 1" ///
		*	"georgia/bycategory" "`title', GE" "graph_stats_notable" "60 90"
		cap drawgraph_1x2_days delta_win1 rblog "c`i' == 1" ///
			"georgia/bycategory" "`title', Rolling Blog, GE" "graph_stats_notable" "60 90"
		cap drop c`i'
		cap drop thecategory
	}
}